using System.Collections.Generic;
using System.Data.Objects;

namespace MvcCms.Data
{
    public interface IEntitiesProvider
    {
        MvcCmsEntities GetEntityContext();
        void ReopenConnection();
        void Refresh<TEntity>(ObjectContext context, RefreshMode refreshMode, TEntity entity) where TEntity : class;

        void Refresh<TEntity>(ObjectContext context, RefreshMode refreshMode, IEnumerable<TEntity> entity) where TEntity : class;

        void Detach<TEntity>(TEntity entity) where TEntity : class;
    }
}